﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Game
{
    class Batka
    {
        private PictureBox pictureBox1;

        public Batka(int x,int y,Form1 pb)
        {


            pictureBox1 = new PictureBox();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.pictureBox1.BackgroundImage = global::Game.Resource1.batka;
            this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox1.InitialImage = null;
            this.pictureBox1.Location = new System.Drawing.Point(x, y);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(90, 121);
            this.pictureBox1.TabIndex = 0;
            this.pictureBox1.TabStop = false;
            this.pictureBox1.Show();

            pb.Controls.Add(pictureBox1);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
        }

        public void MoveTo(int x, int y)
        {
            this.pictureBox1.Location = new System.Drawing.Point(x, y);
        }

        public int X
        {
            get
            {
                return pictureBox1.Location.X;
            }
        }

        public int Y
        {
            get
            {
                return pictureBox1.Location.Y;
            }
        }

        public void MoveUp(int dy)
        {
            this.pictureBox1.Location = new System.Drawing.Point(pictureBox1.Location.X, pictureBox1.Location.Y - dy);
            
        }


        public void MoveDown(int dy)
        {
            this.pictureBox1.Location = new System.Drawing.Point(pictureBox1.Location.X, pictureBox1.Location.Y + dy);
        }

        public void FireArrowTo(int x, int y)
        {

        }
    }
}
